package com.yld.demo2.entity.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yld.demo2.entity.table.OrderList;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.sql.Date;
import java.text.SimpleDateFormat;

//为了将 将交易时间 摘出
@AllArgsConstructor
@NoArgsConstructor
public class OrderListVo extends OrderList {




    @TableField("order_date")
    @ApiModelProperty("交易日期")
    String orderdate;

    public void setOrderdate(Date now) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        this.orderdate = simpleDateFormat.format(now);
    }

    public void setOrderdate(String orderdate) {
        this.orderdate = orderdate;
    }

    public String getOrderdate() {
        return orderdate;
    }

}
